package queuedemo;

import java.util.ArrayDeque;
import java.util.Deque;
import java.util.LinkedList;
import java.util.Queue;

public class Test {

    public static void main(String[] args) {
        Deque<Integer> deque = new LinkedList<>();

        Deque<Integer> deque2 = new ArrayDeque<>();



        Deque<Integer> stack = new LinkedList<>();
        stack.push(12);
        stack.push(23);
        stack.push(34);

        System.out.println(stack.peek());

    }
    public static void main2(String[] args) {
        MyQueue queue = new MyQueue();
        queue.offer(12);
        queue.offer(23);
        queue.offer(34);
        queue.offer(45);

        System.out.println(queue.poll());
        System.out.println(queue.poll());
        System.out.println(queue.poll());
        System.out.println(queue.poll());
        System.out.println(queue.poll());
        System.out.println(queue.peek());
        System.out.println(queue.isEmpty());
    }
    public static void main1(String[] args) {
        Queue<Integer> queue = new LinkedList<>();
        queue.offer(12);
        queue.offer(23);
        queue.offer(34);
        queue.offer(45);

        System.out.println(queue.poll());
        System.out.println(queue.peek());
        System.out.println(queue.isEmpty());
    }
}
